file(GLOB_RECURSE backint_obj_srcs *.cpp)

SET(BACKINT_BASE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
add_executable(backint
    ${backint_obj_srcs}
)

if (TRACEPOINT)
    add_definitions(-DEBK_TRACE_POINT)
endif()

target_include_directories(backint
    PUBLIC
    ${BACKINT_BASE_PATH}/inc
    ${MODULE_OPENSRC_PATH}/jsoncpp_rel/include
    ${MODULE_OPENSRC_PATH}/boost_rel/include
    ${FRAMEWORK_INC_PATH}
    ${FRAMEWORK_INC_PATH}/common
    ${FRAMEWORK_INC_PATH}/utils
    ${MODULE_BASE_PATH}/src
    ${MODULE_SECUREC_INC_PATH}
    ${FRAMEWORK_THRIFT_INC_PATH}
)

target_link_directories(backint
    PUBLIC
    ${MODULE_BASE_PATH}/platform/SecureCLib_rel/lib
    ${MODULE_OPENSRC_PATH}/jsoncpp_rel/libs
    ${MODULE_OPENSRC_PATH}/boost_rel/lib
    ${MODULE_LIB_PATH}
    ${FRAMEWORK_LIB_PATH}
    ${FRAMEWORK_LIB_PATH}/3rd
)

if (TRACEPOINT)
target_link_libraries(backint
    PRIVATE
    securec
    boost_filesystem
    log_util
    common_util
    json
    config_reader_util
    pthread
    safe_cmplib
    tracepoint
)
else()
target_link_libraries(backint
    PRIVATE
    securec
    boost_filesystem
    log_util
    common_util
    json
    config_reader_util
    pthread
    safe_cmplib
)
endif()